Integrand size = 23, antiderivative size = 113 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-(a-b)^2 x+\frac {(a-b)^2 \tan (e+f x)}{f}-\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(a-b)^2 \tan ^5(e+f x)}{5 f}+\frac {(2 a-b) b \tan ^7(e+f x)}{7 f}+\frac {b^2 \tan ^9(e+f x)}{9 f} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3751, 472, 209} \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {b (2 a-b) \tan ^7(e+f x)}{7 f}+\frac {(a-b)^2 \tan ^5(e+f x)}{5 f}-\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(a-b)^2 \tan (e+f x)}{f}-x (a-b)^2+\frac {b^2 \tan ^9(e+f x)}{9 f} \]
[In]
[Out]
Rule 209
Rule 472
Rule 3751
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {x^6 \left (a+b x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {\text {Subst}\left (\int \left ((a-b)^2-(a-b)^2 x^2+(a-b)^2 x^4+(2 a-b) b x^6+b^2 x^8+\frac {-a^2+2 a b-b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f} \\ & = \frac {(a-b)^2 \tan (e+f x)}{f}-\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(a-b)^2 \tan ^5(e+f x)}{5 f}+\frac {(2 a-b) b \tan ^7(e+f x)}{7 f}+\frac {b^2 \tan ^9(e+f x)}{9 f}-\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -(a-b)^2 x+\frac {(a-b)^2 \tan (e+f x)}{f}-\frac {(a-b)^2 \tan ^3(e+f x)}{3 f}+\frac {(a-b)^2 \tan ^5(e+f x)}{5 f}+\frac {(2 a-b) b \tan ^7(e+f x)}{7 f}+\frac {b^2 \tan ^9(e+f x)}{9 f} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(243\) vs. \(2(113)=226\).
Time = 0.10 (sec) , antiderivative size = 243, normalized size of antiderivative = 2.15 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=-\frac {a^2 \arctan (\tan (e+f x))}{f}+\frac {2 a b \arctan (\tan (e+f x))}{f}-\frac {b^2 \arctan (\tan (e+f x))}{f}+\frac {a^2 \tan (e+f x)}{f}-\frac {2 a b \tan (e+f x)}{f}+\frac {b^2 \tan (e+f x)}{f}-\frac {a^2 \tan ^3(e+f x)}{3 f}+\frac {2 a b \tan ^3(e+f x)}{3 f}-\frac {b^2 \tan ^3(e+f x)}{3 f}+\frac {a^2 \tan ^5(e+f x)}{5 f}-\frac {2 a b \tan ^5(e+f x)}{5 f}+\frac {b^2 \tan ^5(e+f x)}{5 f}+\frac {2 a b \tan ^7(e+f x)}{7 f}-\frac {b^2 \tan ^7(e+f x)}{7 f}+\frac {b^2 \tan ^9(e+f x)}{9 f} \]
[In]
[Out]
Time = 0.11 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.11
method | result | size |
norman | \(\left (-a^{2}+2 a b -b^{2}\right ) x +\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )}{f}+\frac {b^{2} \tan \left (f x +e \right )^{9}}{9 f}-\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )^{3}}{3 f}+\frac {\left (a^{2}-2 a b +b^{2}\right ) \tan \left (f x +e \right )^{5}}{5 f}+\frac {\left (2 a -b \right ) b \tan \left (f x +e \right )^{7}}{7 f}\) | \(125\) |
parts | \(\frac {a^{2} \left (\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {b^{2} \left (\frac {\tan \left (f x +e \right )^{9}}{9}-\frac {\tan \left (f x +e \right )^{7}}{7}+\frac {\tan \left (f x +e \right )^{5}}{5}-\frac {\tan \left (f x +e \right )^{3}}{3}+\tan \left (f x +e \right )-\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}+\frac {2 a b \left (\frac {\tan \left (f x +e \right )^{7}}{7}-\frac {\tan \left (f x +e \right )^{5}}{5}+\frac {\tan \left (f x +e \right )^{3}}{3}-\tan \left (f x +e \right )+\arctan \left (\tan \left (f x +e \right )\right )\right )}{f}\) | \(161\) |
derivativedivides | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{9}}{9}+\frac {2 a b \tan \left (f x +e \right )^{7}}{7}-\frac {b^{2} \tan \left (f x +e \right )^{7}}{7}+\frac {a^{2} \tan \left (f x +e \right )^{5}}{5}-\frac {2 a b \tan \left (f x +e \right )^{5}}{5}+\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}-\frac {a^{2} \tan \left (f x +e \right )^{3}}{3}+\frac {2 a b \tan \left (f x +e \right )^{3}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}+a^{2} \tan \left (f x +e \right )-2 a b \tan \left (f x +e \right )+b^{2} \tan \left (f x +e \right )+\left (-a^{2}+2 a b -b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(173\) |
default | \(\frac {\frac {b^{2} \tan \left (f x +e \right )^{9}}{9}+\frac {2 a b \tan \left (f x +e \right )^{7}}{7}-\frac {b^{2} \tan \left (f x +e \right )^{7}}{7}+\frac {a^{2} \tan \left (f x +e \right )^{5}}{5}-\frac {2 a b \tan \left (f x +e \right )^{5}}{5}+\frac {b^{2} \tan \left (f x +e \right )^{5}}{5}-\frac {a^{2} \tan \left (f x +e \right )^{3}}{3}+\frac {2 a b \tan \left (f x +e \right )^{3}}{3}-\frac {b^{2} \tan \left (f x +e \right )^{3}}{3}+a^{2} \tan \left (f x +e \right )-2 a b \tan \left (f x +e \right )+b^{2} \tan \left (f x +e \right )+\left (-a^{2}+2 a b -b^{2}\right ) \arctan \left (\tan \left (f x +e \right )\right )}{f}\) | \(173\) |
parallelrisch | \(-\frac {-35 b^{2} \tan \left (f x +e \right )^{9}-90 a b \tan \left (f x +e \right )^{7}+45 b^{2} \tan \left (f x +e \right )^{7}-63 a^{2} \tan \left (f x +e \right )^{5}+126 a b \tan \left (f x +e \right )^{5}-63 b^{2} \tan \left (f x +e \right )^{5}+105 a^{2} \tan \left (f x +e \right )^{3}-210 a b \tan \left (f x +e \right )^{3}+105 b^{2} \tan \left (f x +e \right )^{3}+315 a^{2} f x -630 a b f x +315 b^{2} f x -315 a^{2} \tan \left (f x +e \right )+630 a b \tan \left (f x +e \right )-315 b^{2} \tan \left (f x +e \right )}{315 f}\) | \(173\) |
risch | \(-x \,a^{2}+2 x a b -x \,b^{2}+\frac {2 i \left (483 a^{2}+563 b^{2}+32508 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+24402 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+26292 b^{2} {\mathrm e}^{6 i \left (f x +e \right )}+11718 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+13968 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+3402 a^{2} {\mathrm e}^{2 i \left (f x +e \right )}+3492 b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+5670 a^{2} {\mathrm e}^{14 i \left (f x +e \right )}+6300 b^{2} {\mathrm e}^{14 i \left (f x +e \right )}-12600 a b \,{\mathrm e}^{14 i \left (f x +e \right )}-1056 a b -2520 a b \,{\mathrm e}^{16 i \left (f x +e \right )}-36120 a b \,{\mathrm e}^{12 i \left (f x +e \right )}-63000 a b \,{\mathrm e}^{10 i \left (f x +e \right )}-52584 a b \,{\mathrm e}^{6 i \left (f x +e \right )}-6984 a b \,{\mathrm e}^{2 i \left (f x +e \right )}-70056 a b \,{\mathrm e}^{8 i \left (f x +e \right )}-25416 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+16170 a^{2} {\mathrm e}^{12 i \left (f x +e \right )}+21000 b^{2} {\mathrm e}^{12 i \left (f x +e \right )}+28350 a^{2} {\mathrm e}^{10 i \left (f x +e \right )}+31500 b^{2} {\mathrm e}^{10 i \left (f x +e \right )}+39438 b^{2} {\mathrm e}^{8 i \left (f x +e \right )}+1575 b^{2} {\mathrm e}^{16 i \left (f x +e \right )}+945 a^{2} {\mathrm e}^{16 i \left (f x +e \right )}\right )}{315 f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{9}}\) | \(381\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.02 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {35 \, b^{2} \tan \left (f x + e\right )^{9} + 45 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{7} + 63 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{5} - 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} - 315 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f x + 315 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{315 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 212 vs. \(2 (88) = 176\).
Time = 0.30 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.88 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\begin {cases} - a^{2} x + \frac {a^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {a^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {a^{2} \tan {\left (e + f x \right )}}{f} + 2 a b x + \frac {2 a b \tan ^{7}{\left (e + f x \right )}}{7 f} - \frac {2 a b \tan ^{5}{\left (e + f x \right )}}{5 f} + \frac {2 a b \tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a b \tan {\left (e + f x \right )}}{f} - b^{2} x + \frac {b^{2} \tan ^{9}{\left (e + f x \right )}}{9 f} - \frac {b^{2} \tan ^{7}{\left (e + f x \right )}}{7 f} + \frac {b^{2} \tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {b^{2} \tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {b^{2} \tan {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right )^{2} \tan ^{6}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.04 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {35 \, b^{2} \tan \left (f x + e\right )^{9} + 45 \, {\left (2 \, a b - b^{2}\right )} \tan \left (f x + e\right )^{7} + 63 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{5} - 105 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} - 315 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (f x + e\right )} + 315 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )}{315 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 2455 vs. \(2 (105) = 210\).
Time = 8.00 (sec) , antiderivative size = 2455, normalized size of antiderivative = 21.73 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\text {Too large to display} \]
[In]
[Out]
Time = 11.91 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.37 \[ \int \tan ^6(e+f x) \left (a+b \tan ^2(e+f x)\right )^2 \, dx=\frac {{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (\frac {2\,a\,b}{7}-\frac {b^2}{7}\right )}{f}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a-b\right )}^2}{a^2-2\,a\,b+b^2}\right )\,{\left (a-b\right )}^2}{f}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a^2-2\,a\,b+b^2\right )}{f}+\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^9}{9\,f}-\frac {{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {a^2}{3}-\frac {2\,a\,b}{3}+\frac {b^2}{3}\right )}{f}+\frac {{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (\frac {a^2}{5}-\frac {2\,a\,b}{5}+\frac {b^2}{5}\right )}{f} \]
[In]
[Out]